package com.example.javaproject.dto;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SalaryDTO {
    
    private Integer id;
    private Integer totalHour;
    private BigDecimal totalSalary;
    private Integer status;     //状态（0：未审核，1：已通过/成功发放，2：未通过/未发放）
    private Boolean isDeleted;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private Integer studentId;
    private Integer teacherId;
    private Integer positionId;
    private String studentName;
    private String teacherName;
    private String positionName;
    private Integer positionSalary;
    private String studentCollege;
    private String studentContact;
    private String positionDescription;
    private String positionLocation;
    private Integer hourlyRate;
    private LocalDateTime auditTime;
    private LocalDateTime payTime;
    private String remark;

    public SalaryDTO() {
    }

    public SalaryDTO(Integer id, Integer totalHour, BigDecimal totalSalary, Integer status, Boolean isDeleted, LocalDateTime createTime, LocalDateTime updateTime, Integer studentId, Integer teacherId, Integer positionId, String studentName, String teacherName, String positionName) {
        this.id = id;
        this.totalHour = totalHour;
        this.totalSalary = totalSalary;
        this.status = status;
        this.isDeleted = isDeleted;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.studentId = studentId;
        this.teacherId = teacherId;
        this.positionId = positionId;
        this.studentName = studentName;
        this.teacherName = teacherName;
        this.positionName = positionName;
    }

    /**
     * 获取
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取
     * @return totalHour
     */
    public Integer getTotalHour() {
        return totalHour;
    }

    /**
     * 设置
     * @param totalHour
     */
    public void setTotalHour(Integer totalHour) {
        this.totalHour = totalHour;
    }

    /**
     * 获取
     * @return totalSalary
     */
    public BigDecimal getTotalSalary() {
        return totalSalary;
    }

    /**
     * 设置
     * @param totalSalary
     */
    public void setTotalSalary(BigDecimal totalSalary) {
        this.totalSalary = totalSalary;
    }

    /**
     * 获取
     * @return status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置
     * @param status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 获取
     * @return isDeleted
     */
    public Boolean getIsDeleted() {
        return isDeleted;
    }

    /**
     * 设置
     * @param isDeleted
     */
    public void setIsDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    /**
     * 获取
     * @return createTime
     */
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    /**
     * 设置
     * @param createTime
     */
    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取
     * @return updateTime
     */
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置
     * @param updateTime
     */
    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取
     * @return studentId
     */
    public Integer getStudentId() {
        return studentId;
    }

    /**
     * 设置
     * @param studentId
     */
    public void setStudentId(Integer studentId) {
        this.studentId = studentId;
    }

    /**
     * 获取
     * @return teacherId
     */
    public Integer getTeacherId() {
        return teacherId;
    }

    /**
     * 设置
     * @param teacherId
     */
    public void setTeacherId(Integer teacherId) {
        this.teacherId = teacherId;
    }

    /**
     * 获取
     * @return positionId
     */
    public Integer getPositionId() {
        return positionId;
    }

    /**
     * 设置
     * @param positionId
     */
    public void setPositionId(Integer positionId) {
        this.positionId = positionId;
    }

    /**
     * 获取
     * @return studentName
     */
    public String getStudentName() {
        return studentName;
    }

    /**
     * 设置
     * @param studentName
     */
    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    /**
     * 获取
     * @return teacherName
     */
    public String getTeacherName() {
        return teacherName;
    }

    /**
     * 设置
     * @param teacherName
     */
    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    /**
     * 获取
     * @return positionName
     */
    public String getPositionName() {
        return positionName;
    }

    /**
     * 设置
     * @param positionName
     */
    public void setPositionName(String positionName) {
        this.positionName = positionName;
    }

    /**
     * 获取
     * @return positionSalary
     */
    public Integer getPositionSalary() {
        return positionSalary;
    }

    /**
     * 设置
     * @param positionSalary
     */
    public void setPositionSalary(Integer positionSalary) {
        this.positionSalary = positionSalary;
    }

    /**
     * 获取
     * @return hourlyRate
     */
    public Integer getHourlyRate() {
        return hourlyRate;
    }

    /**
     * 设置
     * @param hourlyRate
     */
    public void setHourlyRate(Integer hourlyRate) {
        this.hourlyRate = hourlyRate;
    }

    public String getStatusText() {
        if (status == null) return "未知";
        switch (status) {
            case 0: return "待审核";
            case 1: return "已通过";
            case 2: return "已拒绝";
            case 3: return "已发放";
            default: return "未知";
        }
    }

    public String toString() {
        return "SalaryDTO{id = " + id + ", totalHour = " + totalHour + ", totalSalary = " + totalSalary + ", status = " + status + ", isDeleted = " + isDeleted + ", createTime = " + createTime + ", updateTime = " + updateTime + ", studentId = " + studentId + ", teacherId = " + teacherId + ", positionId = " + positionId + ", studentName = " + studentName + ", teacherName = " + teacherName + ", positionName = " + positionName + ", positionSalary = " + positionSalary + "}";
    }
}